<?php
	require_once("dbconnect.php");

	ob_end_clean(); //Clear all choed & printed item
	
	if($_REQUEST['user'] == "login") 
	{ 
		$uid = $_REQUEST['uid'];
		$pass = $_REQUEST['pass'];

		if($uid and $pass)
		{
			$sql = "SELECT * FROM users WHERE ID='$uid' AND PASS='$pass'";
			$result = mysql_query($sql);
			$count = mysql_num_rows($result);
			echo $count . "</end>"; //0 = wrong input
		}
		else
		{
			echo "ERR";
		}
	}
		
		
	mysql_close($con);

?>